// *Author：jxx
// *Contact：283591387@qq.com
// *代码由框架生成,任何更改都可能导致被代码生成器覆盖
export default function(){
    const table = {
        key: 'ProcessInspectionId',
        footer: "Foots",
        cnName: '工序检验',
        name: 'ProcessInspection',
        newTabEdit: false,
        url: "/ProcessInspection/",
        sortName: "ProcessInspectionId"
    };
    const tableName = table.name;
    const tableCNName = table.cnName;
    const newTabEdit = false;
    const key = table.key;
    const editFormFields = {"BillNo":"","ProductProcessReportNo":"","BillDate":"","ProductProcessNo":"","ProductProcessName":"","ProductProcessTypeId":"","DepartmentId":[],"InspectorId":"","InspectionPlanNo":"","InspectionPlanName":"","ReportQty":"","QualifyQty":"","UnQualifyQty":"","ScrapQty":"","Description":""};
    const editFormOptions = [[{"title":"工序检验编号","field":"BillNo","type":"text"},
                               {"title":"工序汇报单号","field":"ProductProcessReportNo","disabled":true,"type":"text"},
                               {"dataKey":"工序信息","data":[],"title":"工序编码","field":"ProductProcessNo","disabled":true,"type":"select"},
                               {"title":"单据日期","required":true,"field":"BillDate","type":"date"}],
                              [{"title":"工序名称","field":"ProductProcessName","disabled":true,"type":"text"},
                               {"dataKey":"工序类型","data":[],"title":"工序类型","field":"ProductProcessTypeId","disabled":true,"type":"select"},
                               {"dataKey":"部门级联","data":[],"title":"部门","field":"DepartmentId","type":"cascader"},
                               {"dataKey":"职员","data":[],"title":"检验员","field":"InspectorId","type":"select"}],
                              [{"title":"检验方案编码","field":"InspectionPlanNo"},
                               {"title":"检验方案名称","field":"InspectionPlanName"},
                               {"title":"汇报数量","field":"ReportQty","type":"decimal"},
                               {"title":"合格数量","field":"QualifyQty","type":"decimal"}],
                              [{"title":"不合格数量","field":"UnQualifyQty","type":"decimal"},
                               {"title":"报废数量","field":"ScrapQty","type":"decimal"},
                               {"title":"备注","field":"Description","type":"textarea"}]];
    const searchFormFields = {};
    const searchFormOptions = [];
    const columns = [{field:'ProcessInspectionId',title:'工序检验标识',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'BillNo',title:'工序检验编号',type:'string',link:true,width:110,align:'left'},
                       {field:'ProductProcessReportId',title:'工序汇报标识',type:'int',width:80,hidden:true,align:'left'},
                       {field:'ProductProcessReportNo',title:'工序汇报单号',type:'string',width:120,readonly:true,align:'left'},
                       {field:'BillDate',title:'单据日期',type:'datetime',width:110,require:true,align:'left'},
                       {field:'ProductProcessId',title:'工序标识',type:'int',width:80,hidden:true,align:'left'},
                       {field:'ProductProcessNo',title:'工序编码',type:'string',bind:{ key:'工序信息',data:[]},width:120,readonly:true,align:'left'},
                       {field:'ProductProcessName',title:'工序名称',type:'string',width:120,readonly:true,align:'left'},
                       {field:'ProductProcessTypeId',title:'工序类型',type:'int',bind:{ key:'工序类型',data:[]},width:80,readonly:true,align:'left'},
                       {field:'DepartmentId',title:'部门',type:'guid',bind:{ key:'部门级联',data:[]},width:110,hidden:true,align:'left'},
                       {field:'InspectorId',title:'检验员',type:'int',bind:{ key:'职员',data:[]},width:80,align:'left'},
                       {field:'InspectionPlanId',title:'检验方案标识',type:'int',width:80,hidden:true,align:'left'},
                       {field:'InspectionPlanNo',title:'检验方案编码',type:'string',width:120,align:'left'},
                       {field:'InspectionPlanName',title:'检验方案名称',type:'string',width:120,align:'left'},
                       {field:'ReportQty',title:'汇报数量',type:'decimal',width:110,align:'left'},
                       {field:'QualifyQty',title:'合格数量',type:'decimal',width:110,align:'left'},
                       {field:'UnQualifyQty',title:'不合格数量',type:'decimal',width:110,align:'left'},
                       {field:'ScrapQty',title:'报废数量',type:'decimal',width:110,align:'left'},
                       {field:'Description',title:'备注',type:'string',width:110,align:'left'},
                       {field:'CreateID',title:'创建人标识',type:'int',width:80,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人名称',type:'string',width:100,align:'left'},
                       {field:'CreateDate',title:'创建日期',type:'datetime',width:150,align:'left'},
                       {field:'ModifyID',title:'修改人标识',type:'int',width:80,hidden:true,align:'left'},
                       {field:'Modifier',title:'修改人名称',type:'string',width:100,align:'left'},
                       {field:'ModifyDate',title:'修改日期',type:'datetime',width:150,align:'left'},
                       {field:'AuditDate',title:'审核日期',type:'datetime',width:150,align:'left'},
                       {field:'AuditStatus',title:'审核状态',type:'int',width:80,align:'left'},
                       {field:'AuditId',title:'审核人标识',type:'int',width:80,align:'left'},
                       {field:'Auditor',title:'审核人',type:'string',width:110,align:'left'}];
    const detail =  {
                    cnName: '工序检验明细',
                    table: 'ProcessInspectionDetail',
                    columns: [{field:'ProcessInspectionDetailId',title:'工序检验明细标识',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'ProcessInspectionId',title:'工序检验标识',type:'int',width:110,hidden:true,align:'left'},
                       {field:'InspectionProjectId',title:'检验项目标识',type:'int',width:80,hidden:true,align:'left'},
                       {field:'InspectionProjectNo',title:'检验项目编码',type:'string',width:120,edit:{type:'text'},align:'left'},
                       {field:'InspectionProjectName',title:'检验项目名称',type:'string',width:120,edit:{type:'text'},align:'left'},
                       {field:'StandardValue',title:'标准值',type:'string',width:120,edit:{type:'text'},align:'left'},
                       {field:'InspectionValue',title:'检验值',type:'string',width:120,align:'left'},
                       {field:'Description',title:'检验方案备注',type:'string',width:110,edit:{type:'text'},align:'left'}],
                    sortName: 'ProcessInspectionDetailId',
                    key: 'ProcessInspectionDetailId'
                                            };
    const details = [];

    return {
        table,
        key,
        tableName,
        tableCNName,
        newTabEdit,
        editFormFields,
        editFormOptions,
        searchFormFields,
        searchFormOptions,
        columns,
        detail,
        details
    };
}